package kokonut.shop.product;

import com.google.appengine.api.datastore.Key;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * Class that stores the key of a image stored in the GAE blobstore and a description for it
 * @author markel
 */
@PersistenceCapable
public class Image {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
    /**
     * Key of the image stored in the blobstore
     */
    private String imageKey;
    /**
     * Description of the image, for example, the color of the shirt in the photo
     */
    private String description;

    public Image(){

    }

    public Image(String imageKey, String desc) {
        this.imageKey = imageKey;
        this.description = desc;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getImageKey() {
        return imageKey;
    }

    public void setImageKey(String imageKey) {
        this.imageKey = imageKey;
    }
}
